home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / AUTOCAD / H107.ZIP / APR91.ZIP / TIP648.LSP < prev    next >
Text File  |  1991-04-11  |  651b  |  24 lines

  1. ;TIP648.LSP   Match Entities   (c)1991, Rob Tushek
  2.  
  3. (defun C:MATCH (/ SS DC DL DLT EC)
  4.   (menucmd "S=SELECT")
  5.   (prompt "Pick entities to change: ")
  6.    (setq SS (ssget))
  7.   (setq EC (entsel "Entity to match: "))
  8.   (setq DC (cdr (assoc 62 (entget
  9.     (car EC)))))
  10.   (setq DL (cdr (assoc 8 (entget
  11.     (car EC)))))
  12.   (setq DLT (cdr (assoc 6 (entget
  13.     (car EC)))))
  14.   (progn
  15.    (if (= DLT nil) (setq DLT "BYLAYER"))
  16.    (if (= DC nil) (setq DC "BYLAYER"))
  17.    (command "CHANGE" SS "" "P" "LT" DLT
  18.      "LA" DL "C" DC "" )
  19.   )
  20.   (prompt "Entities changed to:.....\n ")
  21.   (LIST "Layer:..>>" DL "Color:..>>" DC
  22.     "Ltype:..>>" DLT)
  23. )
  24.